package eu.jpereira.trainings.designpatterns.creational.abstractfactory;

import eu.jpereira.trainings.designpatterns.creational.abstractfactory.json.JSONReportBody;
import eu.jpereira.trainings.designpatterns.creational.abstractfactory.json.JSONReportFooter;
import eu.jpereira.trainings.designpatterns.creational.abstractfactory.json.JSONReportHeader;


public class JSONReport extends Report
{
        private String reportContent;
        private ReportBody body;
        private ReportFooter footer;
        private ReportHeader header;    
        private String reportType;
               
       
        /**
         * @param string
         */
        public JSONReport()
        {
                reportType = "JSON";
                //to compose Report with JSON objects
                this.setBody(createBody());
                this.setFooter(createFooter());
                this.setHeader(createHeader());
               
        }
       
        ReportHeader createHeader()
        {
                return new JSONReportHeader();
        }
        ReportBody createBody()
        {
                return new JSONReportBody();
        }
        ReportFooter createFooter()
        {
                return new JSONReportFooter();
        }

        public void setBody(ReportBody body)
        {
                this.body = body;

        }

       
        public void setFooter(ReportFooter footer) {
                this.footer = footer;

        }

       
        public void setHeader(ReportHeader header) {
                this.header = header;
        }

        public void setReportContent(String reportContent) {
                this.reportContent = reportContent;
        }


        public String getReportContent() {
                return reportContent;
        }
        public ReportBody getBody() {
                return body;
        }


        public ReportFooter getFooter() {
                return footer;
        }


        public ReportHeader getHeader() {
                return header;
        }
}

